//导入http
import http from "../utils/http";
//导入请求参数类型
import { registerParams,OrderStateParams,SeatParams,SeatsParams,OrderaddParams,
  loginParams ,UpdateParams, MovieDeleteParams,MovieParams, CinemaDeleteParams,
   CinemaParams, OrderParams, MovieSearchParams, RoomParams,DeleteDiscussParams,discussParams,
   EditdiscussParams,SeatDeleteParams,
   UserSearchParams, SeatStateParams,MovieidParams, OrderDeleteParams, ArrangeParams, } from "../types/parmas"

/**
 * @description: 用户注册
 * @param {registerParams} params 用户注册请求的参数，账号和密码
 * @return  返回请求注册接口的结果
 */
export function postRegisterAPI(params: registerParams) {
  
  return http.post("/Register", params);
}

/**
 * @description: 管理员登录
 * @param {loginParams} params 用户登录请求参数，账号和密码
 * @return 返回请求登录接口的结果
 */
export function postLoginAPI(params: loginParams) {
  return http.post("/Login", params);
}
/**
 * @description: 用户列表
 * @return 返回用户列表查询接口的结果
 */
 export function postSelectAPI() {
  return http.post("/Select");
}
/**
 * @description: 更新
 * @return 返回更新接口的结果
 */
 export function postUpdatetAPI(params: UpdateParams) {
  return http.post("/Update",params);
}
/**
 * @description: 删除
 * @return 返回请用户删除接口的结果
 */
 export function postUserDeleteAPI(params:any) {
  return http.post("/Delete",params);
}
/**
 * @description: 查询
 * @return 返回用户列表搜索接口的结果
 */
 export function getUserSearchAPI(params: UserSearchParams) {
  return http.get("/SearchUser",params);
}



/**
 * @description: 按条件查询
 * @return 返回搜素电影接口的结果
 */
export function getSearchMovieAPI(param:MovieSearchParams) {
  return http.get("/SearchMovie",param);
}
/**
 * @description: 查询
 * @return 返回查询电影接口的结果
 */
 export function postSelectMovieAPI() {
  return http.post("/Movies");
}
/**
 * @description: 添加
 * @return 返回添加电影接口的结果
 */
 export function postAddMovieAPI(param:MovieParams) {
  return http.post("/AddMovie",param);
}
/**
 * @description: 删除
 * @return 返回添加电影接口的结果
 */
 export function postDeleteMovieAPI(param:MovieDeleteParams) {
  return http.post("/MovieDelete",param);
}
/**
 * @description: 修改
 * @return 返回修改电影接口的结果
 */
 export function postUpdateMovieAPI(param:MovieParams) {
  return http.post("/UpdateMovie",param);
}

export function SearchMovieAPI(param:MovieSearchParams) {
  return http.get("/SearchMovie",param);
}
export function getSearchMovieid(param:MovieidParams){
  return http.post("/SearchMovieid",param);
}
/**
 * @description: 查询
 * @return 返回查询影院接口的结果
 */
 export function postSelectCinemaAPI() {
  return http.post("/Cinemas");
}
/**
 * @description: 添加
 * @return 返回添加影院接口的结果
 */
 export function postAddCinemaAPI(param:CinemaParams) {
  return http.post("/AddCinema",param);
}
/**
 * @description: 删除
 * @return 返回添加影院接口的结果
 */
 export function postDeleteCinemaAPI(param:CinemaDeleteParams) {
  return http.post("/DeleteCinema",param);
}

/**
 * @description: 修改
 * @return 返回修改影院接口的结果
 */
 export function postUpdateCinemaAPI(param:CinemaParams) {
  return http.post("/UpdateCinema",param);
}
/**
 * @description: 查询
 * @return 返回查询订单接口的结果
 */
 export function postselectOrderAPI() {
  return http.post("/Order");
}
/**
 * @description: 删除
 * @return 返回删除订单接口的结果
 */
 export function postDeleteOrderAPI(param:OrderDeleteParams) {
  return http.post("/DeleteOrder",param);
}
/**
 * @description: 查询
 * @return 返回订单列表搜索接口的结果
 */
 export function getOrderSearchAPI(params: OrderParams) {
  return http.get("/SearchOrder",params);
}
/**
 * @description: 修改订单状态
 * @return 返回true||false
 */
export function postOrderStateAPI(params: OrderStateParams) {
  return http.post("/UpdateOrderState",params);
}
/**
 * @description: 修改
 * @return 返回修改订单接口的结果
 */
 export function postUpdateOrderAPI(param:OrderParams) {
  return http.post("/UpdateOrder",param);
 }

export function postExprotAPI() {
    return http.post("/Export");
}
export function postaddOderAPI(param:OrderaddParams) {
  return http.post("/addOrder",param);
}

/*
 *@Description: 座位
 *@Date: 2023-04-06 18:18:25
 *@return: 
*/
export function postSelectSeat(param:SeatParams){
  return http.post("/SelectSeat",param)
}
export function postallSeat(){
  return http.post("/selectSeatInfo")
}
export function postallSeatInfo(){
  return http.post("/allSeat")
}
export function postAddSeat(param:SeatsParams){
  return http.post("/addSeat",param)
  }
export function postUpdateSeatstate(param:SeatStateParams){
  return http.post("/updataSeatState",param)
}
export function postDeleteSeat(param:SeatDeleteParams){
  return http.post("/deleteSeat",param)
}
export function postSelectRoom(){
  return http.post("/selectRoom")
}
/*
 *@Description: 查询时间段
 *@Date: 2023-03-13 17:09:54
 *@return: 返回时间段集合
*/
export function postSelectSession(){
  return http.post("/selectSession")
}
export function postUpdateRoomrc(param:RoomParams){
  return http.post("/updateRoom",param)
}
export function postdeleteDiscuss(param:DeleteDiscussParams){
  return http.post("/deleteDiscuss",param)
}
/*
 *@Description: 某个电影下所有评论
 *@Date: 2023-04-09 18:42:11
 *@return: 
*/
export function postAllDiscuss(){
  return http.post("/AllDiscuss")
}
/*
 *@Description: 写评论
 *@Date: 2023-04-10 17:40:08
 *@return: 
*/
export function postAddDiscuss(param:EditdiscussParams){
  return http.post("/addDiscuss",param)
}
/*
 *@Description: 角色查询
 *@Date: 2023-05-07 17:48:20
 *@return: 
*/
export function postSelectRole(param:any){
  return http.post("/role",param)
}
/*
 *@Description: 排片查询
 *@Date: 2023-05-08 19:01:02
 *@return: 
*/
export function postSelectArrange(){
  return http.post("/arrange")
}
/*
 *@Description: 排片添加
 *@Date: 2023-05-09 19:01:19
 *@return: 
*/
export function postAddArrange(param:ArrangeParams){
  return http.post("/addArrange",param)
}
/*
 *@Description: 排片状态切换
 *@Date: 2023-05-09 19:52:28
 *@return: 
*/
export function postUpdateArrangeState(param:any){
  return http.post("/updateArrangeState",param)
}

/*
 *@Description: 删除排片
 *@Date: 2023-05-09 20:19:02
 *@return: 
*/
export function postDelectArrange(param:any){
  return http.post("/DeleteArrange",param)
}
/*
 *@Description: 修改排片信息
 *@Date: 2023-05-10 23:27:50
 *@return: 
*/
export function postUpdateArrange(param:any){
  return http.post("/UpdateArrange",param)
}
